feat: support bolt+routing#391
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Expose client-side Bolt routing support (for Memgraph HA) through GQLAlchemy’s connection/vendor layers, and add CI + tests to validate routed read/write behavior.
Changes:
- Add routing-capable connection creation (
routing,access_mode,resolver) toMemgraphConnectionand plumb it through theMemgraphvendor client. - Introduce a
GQLAlchemyTransientErrorand mapmgclient.TransientErrorviadatabase_error_handler. - Add HA routing integration tests plus a Docker-based HA cluster bootstrap script and CI workflow step.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
gqlalchemy/connection.py |
Adds routing/access-mode/resolver plumbing into mgclient.connect(...) creation. |
gqlalchemy/vendors/memgraph.py |
Passes routing parameters from Memgraph client into MemgraphConnection. |
gqlalchemy/exceptions.py |
Adds GQLAlchemyTransientError and maps transient driver errors in the decorator. |
gqlalchemy/__init__.py |
Exposes new exception types at the package top-level. |
tests/test_exceptions.py |
Adds unit tests for transient vs non-transient error mapping behavior. |
tests/integration/test_routing.py |
Adds integration tests validating routed READ/WRITE connections against an HA cluster. |
scripts/ha_cluster.sh |
Adds a helper script to start/stop a local Memgraph HA cluster in Docker for tests/CI. |
pytest.ini |
Registers a routing marker for HA-dependent tests. |
pyproject.toml |
Temporarily points pymgclient to a git branch via uv sources to develop/test routing. |
.github/workflows/build-and-test.yml |
Starts/stops the HA cluster in CI (when license secrets exist) to run routing tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mattkjames7
marked this pull request as ready for review
July 20, 2026 13:58
mattkjames7
requested review from
Josipmrden,
antejavor,
as51340 and
katarinasupe
as code owners
July 20, 2026 13:58
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
antejavor
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Expose bolt+routing support for Memgraph HA provided by
pymgclientin memgraph/pymgclient#86 and released inpymgclient==1.6.0.MemgraphConnectionclass to create a routed connection.execute_read()andexecute_write()to theMemgraphTransactionclass.GQLAlchemyTransientErrorexception class to show when errors from Memgraph indicate that a retry should be attempted.Pull request type
Please delete options that are not relevant.
Checklist:
######################################
Reviewer checklist (the reviewer checks this part)
######################################